#pragma once

#include "stdafx.h"
#include "led.h"
#include "stdint.h"
#include "ledDlg.h"

class ledImage
{
public:
	ledImage(unsigned radius, unsigned portion, unsigned leaf, class CledDlg *dlg = NULL);
	~ledImage(void);

	int open(CString name);
	int write(CImage *image, uint32_t time);
	int writeLine(CImage *image, struct line_head *head, unsigned point);

	void close();
private:
	void writeLinePos(unsigned point);
	void ledImage::putPos();

private:
	CPoint *m_pos;
	class CledDlg *m_dlg;
	FILE *m_file;
	const unsigned m_portion;
	const unsigned m_radius;
	const unsigned m_leaf;
};

